package com.swpu.zdl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.swpu.zdl.mapper.StudentMapper;
import com.swpu.zdl.pojo.Student;
import com.swpu.zdl.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class StudentServiecImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> getAll() {
        return studentMapper.getAll();
    }

    @Override
    public boolean addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    @Override
    public boolean deleteStudent(String sno) {
        return studentMapper.deleteStudent(sno);
    }

    @Override
    public List<Student> getAllMsg() {
        return studentMapper.getAllMsg();
    }

    @Override
    public Boolean updateStudentMsg(String sno, Student student) {
        return studentMapper.updateStudentMsg(sno, student);
    }

    @Override
    public Student getMsgBySno(String sno) {
        return studentMapper.getMsgBySno(sno);
    }

    @Override
    public List<Student> getByName(String name) {
        return studentMapper.getByName(name);
    }
}
